<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" href="css/common.css" type="text/css" />
        <link href="css/adminstyle.css" rel="stylesheet" type="text/css">
		<link href="css/ui-lightness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" type="text/css">
		<script  language="javascript" type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
		<script   language="javascript" type="text/javascript"src="js/jquery-ui-1.10.3.custom.js"></script>
        <title><?=Common::_t('page_admin_area')?></title>    </head>
<script>
$(function() {		
	$( "#tabs" ).tabs();
});
function openStudentCourseList(id,height,width){
	var url = 'bookCourse_studentCourseList.htm?user_id='+id;
	window.open (url,'newwindow','height='+height+',width='+width+',top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
}
</script>    
    <body>
        <?$page_th = Common::_t('page_th');?>
     <div id="man_zone">
    <div id="tabs">
     <ul>
     <?if($_SESSION['admin']['group']['admin']==ADMIN||$_SESSION['admin']['group']['code']=='TEACHERR_MANAGER_PH'){?>
     	<?if(trim($_GET['refer_url'])!='bookCourse_studentCourseList'){?>
		<li><a href="#tabs-3"><?=getStr($page_th, 'operator_log')?></a></li>
		<?}?>
	 <?}?>
		<li><a href="#tabs-1"><?=getStr($page_th, 'class_info')?></a></li>
		<li><a href="#tabs-2"><?=getStr($page_th, 'coureRecord_info')?></a></li>
	 </ul>       
        <div style="background-color:#FFFFFF ">
         <div id="tabs-2">
            <? $id=getStr($extract_vars, 'id');
				$page_th = Common::_t('page_th');
			 ?>
                    <input name="id" type="hidden" value="<?=$id?>">
                    <input name="book_course_id" type="hidden" value="<?=$_GET['bookCourseId']?>"    />
                    
                    <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
                        <tr class="header">
                            <td colspan="4">
                                &nbsp;<?=getStr(Common::_t('page_th'), 'class_record')?>
                            </td>
                        </tr>
                            <tr bgcolor="#FFFFFF" >
                            <td align="right" class="left_title_2adminssd">
                                 &nbsp;<?=getStr($page_th, 'student_name')?>
                            </td>
                            <td  style="width:200px;">
                         		   <?=$book['english_name']?>                                                   
                            </td>
                            <td align="right" class="left_title_2adminssd">
                             	&nbsp;<?=getStr($page_th, 'user_kind')?>
                            </td>
                            <td>
                            	<font color="red"><?=$user_data['user_kind'][$user['user_kind']]?></font>
                            </td>
                        	</tr>                         
                         <tr bgcolor="#FFFFFF" >
                            <td align="right" class="left_title_2adminssd">
                              	  &nbsp;<?=getStr($page_th, 'lesson_learned')?>
                            </td>
                            <td  style="width:200px;">
                               &nbsp;&nbsp;<font color="blue"><?=$userData['sumStudyClass']?></font>&nbsp;&nbsp;classes                                                 
                            </td>
                            <td align="right" class="left_title_2adminssd">
                             &nbsp;<?=getStr($page_th, 'class_record_list')?>
                            </td>
                            <td>
                             <input type="button"  name="student_record" value="List " onClick="openStudentCourseList('<?=$book['user_id']?>','600','800');">
                            </td>
                        </tr>                          
                        <tr bgcolor="#FFFFFF" >
                            <td align="right" class="left_title_2adminssd">
                              	<?=getStr($page_th, 'student_status')?>
                            </td>
                            <td  style="width:200px;">
                               <?=$courseRecord['user_status_list'][$courseRecord['user_status']]?>
                            </td>
                            <td align="right" class="left_title_2adminssd">
                            &nbsp;
                            </td>
                            <td>
                             &nbsp;
                            </td>
                        </tr>
                        <tr bgcolor="#FFFFFF" >
                            <td align="right" class="left_title_2adminssd">
                               <?=getStr($page_th, 'teach_content')?>
                            </td>
                            <td  style="width:200px;"> 
                             <textarea cols="80" rows="10" readonly><?=getStr($courseRecord, 'content')?></textarea> 
                            </td>
                            <td align="right" class="left_title_2adminssd">
                                <?=getStr($page_th, 'student_content')?>
                            </td>
                            <td>
                             <textarea cols="80" rows="10" readonly><?=getStr($courseRecord, 'feedback')?></textarea>  
                            </td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                            <td align="right" class="left_title_2adminssd">
                               <?=getStr($page_th, 'grammar')?>
                            </td>
                            <td>
                             <textarea cols="80" rows="5" readonly><?=getStr($courseRecord, 'grammar')?></textarea>  
                            </td>
                            <td align="right" class="left_title_2adminssd">
 							<?=getStr($page_th, 'vocabulary')?>  
                            </td>
                            <td>
                            <textarea cols="80" rows="5" readonly>	<?=getStr($courseRecord, 'vocabulary')?></textarea> 
                            </td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                            <td align="right" class="left_title_2adminssd">
                                <?=getStr($page_th, 'pronunciation')?>
                            </td>
                            <td>
                               <textarea cols="80" rows="5" readonly><?=getStr($courseRecord, 'pronunciation')?></textarea>
                            </td>
                            <td align="right" class="left_title_2adminssd">
                                <?=getStr($page_th, 'teacher_message')?>
                            </td>
                            <td>
                                <textarea cols="80" rows="5" readonly><?=getStr($courseRecord, 'teacher_message')?></textarea>
                            </td>
                        </tr>
                         <?if($book['book_type']==BOOK_TYPE_2){?>
                            <tr bgcolor="#FFFFFF">
                                <td  class="left_title_2adminssd">
                                   	<?=getStr($page_th, 'student_level')?>
                                </td>
                                <td>
                               		<?=$courseRecord['user_level']?>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>    
                         <?}?>                       
                    </table>
       				 </div>
					<div  id="tabs-1">  
					    <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">   
					        <tr class="header">
					          <td colspan="8"><?=getStr($page_th, 'class_info')?></td>
					        </tr>
					        <tr  bgcolor="#FFFFFF">
					          <td style="font-weight:bold;width:10%;" align="center"><?=getStr($page_th, 'class_title')?></td>
					          <td style="width:20%;">
					          	<span class="span_detail"><?=getStr($page_th, 'book_type')?>：<?=$book['book_type_name']?>&nbsp;</span><br>
					          	<br>
					          	<span class="span_detail"><?=getStr($page_th, 'class_time')?>：<?=$book['book_time']?></span><br>
					          	<br>
					          	<span ><?=getStr($page_th, 'class_tool')?>：<?=$book['communication_tools_name']?></span></td>
					          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'book_status')?></td>
							  <td><?=$book['class_status_name']?></td>
					          <td style="font-weight:bold;" align="center">
					          	<?=getStr($page_th, 'teacher_status')?>
					          </td>
					          <td><?=$book['teacher_status_name']?></td>          
					          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'student_status')?></td>
					          <td><?=$book['user_status_name']?></td>
					      </tr>
					      <tr  bgcolor="#FFFFFF">
					      <td colspan="8">&nbsp;
					      
					      </td>
					      </tr>      
					        <tr  bgcolor="#FFFFFF">
					          <td style="font-weight:bold;width:10%;" align="center"><?=getStr($page_th, 'course_info')?></td>
					          <td >
					          <span class="span_detail"><?=getStr($page_th, 'course_title')?>:<?=$course['theme']?>&nbsp;</span><br>
					          <span class="span_detail"><?=getStr($page_th, 'course_no')?>:<?=$course['serial_number']?>&nbsp;</span><br>
					          </td>
					          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'course_type')?></td>
					          <td><?=$course['type_name']?></td>
					          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'chapter_info')?></td>
					          <td>
					         <?if($course['type']!=COURSE_TYPE_SPECIAL){?>
					          <span class="span_detail"><?=getStr($page_th, 'chapter_no')?>:<?=$book['chapter_no']?>&nbsp;</span><br>
					          <span class="span_detail"><?=getStr($page_th, 'chapter_title')?>:<?=getLangStr($book['chapter_name'],$_SESSION['admin']['default_lang'])?>&nbsp;</span><br>
							  <?}?>
					          </td>
					          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'course_download')?></td>
							  <td>
							  <?if($course['type']!=COURSE_TYPE_SPECIAL){?>
							  <a href="chapter_download.html?id=<?=$book['chapter_id']?>" target="_blank">
							  <font color="blue"><?=getStr($page_th, 'course_download')?></font></a>
							  <?}?>
							  </td>
					      </tr>
					      <tr  bgcolor="#FFFFFF">
					      <td colspan="8">&nbsp;
					      
					      </td>
					      </tr>
					       <tr bgcolor="#FFFFFF">
					          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'student_title')?></td>
					          <td><span  class="span_detail"><?=getStr($page_th, 'student_name')?>：<?=$book['english_name']?>
					          </span>
					          <br>
					          <?if($_SESSION['admin']['admin_type']!=ADMIN_TYPE_TEACHER){ ?>
					          <br>
					          <span  class="span_detail"><?=getStr($page_th, 'student_tel')?>：<?=$book['phone']?></span>
					          <br>
					          <?}?>
					          <br>
					          <? if($book['communication_tools']==QQ){?>
					          <span class="span_detail">QQ：<?=$book['qq']?></span>
					          <? } ?>
					          <? if($book['communication_tools']==SKYPE){?>
					          <span class="span_detail">SKYPE：<?=$book['skype_id']?></span>
					          <?}?>
					          <br>
					          <br>
					          <span class="span_detail"><?=getStr($page_th, 'student_job')?>：<?=getStr($user['user_job_pair'],$user['job'])?></span>
					          <br>
					          <br>
					          <span><?=getStr($page_th, 'student_level')?>：<?=getStr($user['level_pair'],$user['level'])?></span>
					          </td>
							  <?if($_SESSION['admin']['admin_type']!=ADMIN_TYPE_TEACHER){ ?>	
						          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'student_follower')?></td>
						          <td ><?=$user['employee_name']?></td>                    
						          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'student_message')?></td>
						          <td colspan="5"><?=$book['message']?></td>
					          <?}else{?>                    
						          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'student_message')?></td>
						          <td colspan="7"><?=$book['message']?></td>
					          <?}?>
					        </tr>
					      <tr  bgcolor="#FFFFFF">
					      <td colspan="8">&nbsp;
					      
					      </td>
					      </tr>        
					        <tr bgcolor="#FFFFFF">
					          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'teacher_title')?></td>
					          <td ><br><span  class="span_detail"><?=getStr($page_th, 'teacher_name')?>：<?=$teacher['name']?></span><br><br>
					          <? if($book['communication_tools']==QQ){?>
					          <span >QQ：<?=$teacher['qq']?></span>
					          <? } ?>
					          <? if($book['communication_tools']==SKYPE){?>
					          <span >SKYPE：<?=$teacher['skype']?></span>
					          <? }?>
					          <br>
					          <br>
					          </td>
					           <?if($_SESSION['admin']['admin_type']!=ADMIN_TYPE_TEACHER){ ?>	
						          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'teacher_follower')?></td>
						          <td ><?=$teacher['employee_name']?></td>
						          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'teacher_service')?></td>
						          <td><?=$teacher['email']?></td>
						          <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'teacher_level')?></td>
						          <td><?=getStr($user['level_pair'],$teacher['teach_level'])?></td>
					          <?}else{?>          
						          <td style="font-weight:bold;" align="center">&nbsp;</td>
						          <td colspan="5"></td>
					          <?}?>
					        </tr>
					      <tr  bgcolor="#FFFFFF">
					      <td colspan="8">&nbsp;
					      </td>
					      </tr>        
						</table>
						</td>
				       </tr>
					 </table>
				</div>   
				<?if($_SESSION['admin']['group']['admin']==ADMIN||$_SESSION['admin']['group']['code']=='TEACHERR_MANAGER_PH'){?>
				<?if(trim($_GET['refer_url'])!='bookCourse_studentCourseList'){?>
				<div id="tabs-3">
					  <form method="post" id="form" action="" >
					 <table width="96%" border="0" cellpadding="3" cellspacing="1" class="tableborder" align="center">
					         <tr  class="header">
					          <td colspan="6" ><?=Common::_t('page_operation')?></td>
					        </tr>      
							<tr bgcolor="#FFFFFF" id="tr_substitute">
								
					          <td style="font-weight:bold; width:10%;" align="center" ><?=getStr($page_th, 'class_set')?></td>
					          <td style="width:20%;" colspan="1">
					          <?if ($book['class_status']==CLASS_STATUS_2){?>
					          <?=$book['teacher_substitute_list'][$book['teacher_substitute']]?>
					           <input type="hidden" name="substitute" id="substitute" value="<?=$book['teacher_substitute']?>">
					          <?}else{?>
					          <?=page_modifier_radios('substitute',$book['teacher_substitute_list'],$book['teacher_substitute'])?>
					          <?}?>
					          </td>          
					          <td style="font-weight:bold; width:10%;" align="center" ><?=getStr($page_th, 'teacher_set')?></td>
					          <td style="width:20%;"  colspan="1">
					          <input type="hidden" name="original_teacher_id" id="original_teacher_id" value="<?=$book['original_teacher_id']?>">
					          <input type="hidden" name="old_teacher_id" id="old_teacher_id" value="<?=$book['old_teacher_id']?>">
					          <input type="hidden" name="old_teacher_name" id="old_teacher_name" value="<?=$book['old_teacher_name']?>">
					          <input type="hidden" name="old_class_status" id="old_class_status" value="<?=$book['class_status']?>">
					            <?if ($book['class_status']==CLASS_STATUS_2){?>
							          <?=$book['substitue_teacher_pair'][$book['teacher_id']]?>
							          <input type="hidden" name="teacher_id" id="teacher_id" value="<?=$book['teacher_id']?>">
					          <?}else{?>
						          <select id="teacher_id" name="teacher_id">
						             <?=page_modifier_options($book['substitue_teacher_pair'],$book['teacher_id'])?>
						          </select>
					           <?}?>
					          &nbsp;
					          </td>          
					          <td style="font-weight:bold; width:10%;" align="center" ><?=getStr($page_th, 'take_over_info')?></td>
					          <td style="width:20%;"  colspan="1">
					          <span id="old_teacher_info">&nbsp;</span><br>
					          <span>-------------------------------------------------</span><br>
					          <span id ="new_teacher_info">&nbsp;</span>
					          &nbsp;
					          </td>          
							</tr> 	        
							<tr bgcolor="#FFFFFF">
					          <td style="font-weight:bold; width:10%;" align="center" ><?=getStr($page_th, 'teacher_report_status')?></td>
					          <td style="width:20%;">
					          <?=page_modifier_radios('report_status',$book['teacher_report_status_list'],$book['teacher_report_status'])?>
					          </td>          
					          <td style="font-weight:bold; width:10%;" align="center" ><?=getStr($page_th, 'teacher_status')?></td>
					          <td style="width:20%;">
					          <?=page_modifier_radios('teacher_status',$book['teacher_status_list'],$book['teacher_status'])?>
					          </td>          
					          <td style="font-weight:bold;width:10%;" align="center"><?=getStr($page_th, 'student_status')?></td>
					          <td style="width:20%;" align="left">
					          <?=page_modifier_radios('user_status',$book['user_status_list'],$book['user_status'])?>
					          </td>
							</tr>     
							<tr bgcolor="#FFFFFF">
					          <td colspan="1" ><?=getStr($page_th, 'operation_content')?></td>
					          <td colspan="5" ><textarea name="remark" id="textfield" cols="50" rows="5"></textarea></td>		
							</tr>	
							<tr>
							<td colspan="6" bgcolor="#FFFFFF">&nbsp;</td>
							</tr>
							<tr bgcolor="#FFFFFF">
					          <td style="font-weight:bold;width:15%;" align="center"><?=getStr($page_th, 'book_status')?></td>
							  <td style="width:10%;" colspan="2"><?=$book['class_status_name']?></td>
							  <td style="font-weight:bold;" align="center"><?=getStr($page_th, 'operation_info')?></td>
							  <td style="width:15%;"  colspan="2">
							  <? if ($book['class_status']==CLASS_STATUS_0){?>
							  <?=$book['add_user']?>&nbsp;&nbsp;<?=getStr($page_th, 'operation_action_add')?>
							  <?=date('Y-m-d H:i:s',$book['add_time'])?>
							  <? }?>
							  <? if ($book['class_status']==CLASS_STATUS_1){?>
							  <?=$book['confirm_admin']?>&nbsp;&nbsp;<?=getStr($page_th, 'operation_action_confirm')?>
							  <?=date('Y-m-d H:i:s',$book['confirm_time'])?>
							  <?}?>
							  <?if ($book['class_status']==CLASS_STATUS_2){?>
							  <?=$book['complete_admin']?>&nbsp;&nbsp;<?=getStr($page_th, 'operation_action_complete')?>
							  <?=date('Y-m-d H:i:s',$book['complete_time'])?>
							  <?}?>
							  <?if ($book['class_status']==CLASS_STATUS_3){?>
							  <?=$book['cancel_admin']?>&nbsp;&nbsp;<?=getStr($page_th, 'operation_action_cancel')?>
							  <?=date('Y-m-d H:i:s',$book['cancel_time'])?>
							  <?}?>
							  </td>
							</tr>
							<tr>
							<td colspan="6" bgcolor="#FFFFFF">&nbsp;</td>
							</tr>
							<?if($book['class_status']!=CLASS_STATUS_2&&$book['class_status']!=CLASS_STATUS_3){?>
								<tr   bgcolor="#FFFFFF">
						          <td colspan="6" >
							       <input name="id" type="hidden" value="<?=$book['id']?>" />
							       <?if($_SESSION['admin']['admin_type']==ADMIN_TYPE_TEACHER){ ?>
						       	    	<input name="" type="button" value="<?=Common::_t('page_back')?>" class="PublicBot" onclick="location.href='BookCourse_teacherManagerList.html'" />
						       	   <?}else{?>
						       	   		 <input name="" type="button" value="<?=Common::_t('page_back')?>" class="PublicBot" onclick="location.href='BookCourse_lists.html'" />
						       	   <?}?> 
						       	   <?if($book['class_status']!=CLASS_STATUS_3){?>
							         <input name="" type="button" value="<?=Common::_t('page_save')?>" class="PublicBot" onclick="subs('BookCourse_saveRemark.html')" />
							          <input name="" type="button" class="PublicBot" value="<?=Common::_t('page_complete')?>"  onclick="subs('BookCourse_complete.html')" />
						           <?}?>	
						          </td>
						        </tr>
					        <?}?>
					 		 	<tr  bgcolor="#FFFFFF">
					   			 <td style="width:15%" colspan="1"><?=getStr($page_th, 'operation_type')?></td>
					   			 <td style="width:15%" colspan="1"><?=getStr($page_th, 'operation_user')?></td>
					   			 <td style="width:15%"  colspan="2"><?=getStr($page_th, 'operation_time')?></td>
					   		 	<td style="width:55%"  colspan="2"><?=getStr($page_th, 'operation_content')?></td>
					  			</tr>
							  <?
							  foreach($log as $v){
							  ?>
							    <tr  bgcolor="#FFFFFF">
							    <td colspan="1"><?=$v['type']?></td>
							    <td colspan="1"><?=$v['add_admin']?></td>
							    <td colspan="2"><?=date('Y-m-d H:i:s',$v['add_time'])?></td>
							    <td colspan="2"><?=$v['remark']?></td>
							  </tr>
							  <?
							  }
							  ?>        
					 </table>
					</form> 
			</div>  
			<?}?>		
			<?}?>		        
        </div>
       </div>
       <div>
       <?if($_SESSION['admin']['group']['code']!='TEACHERR_MANAGER_PH'){?>
       <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">
           <tr bgcolor="#FFFFFF">
           <td colspan="8">
              &nbsp;
              </td>
           </tr>
           <?$backUrl='BookCourse_teacherManagerList.html' ; ?>
           <?if(isset($_GET['refer_url'])){?>
           		<?$backUrl=$_GET['refer_url'].'.html'; ?>
           		<?if($_GET['refer_url']=='bookCourse_studentCourseList'){?>
           			<?$backUrl=$_GET['refer_url'].'.html?user_id='.$book['user_id']; ?>
           		<?}?>
           <?}?>
           		
          <tr bgcolor="#FFFFFF">
           <td colspan="4" align="center">
                <input name="input" type="button" class="PublicBot" value="<?=Common::_t('page_back')?>" onclick="javaScript:location.href='<?=$backUrl?>'"/>
           </td>
         </tr>       
       </table>
       <?}?>
       </div>
       </div> 
<?$page_message = Common::_t('page_message');
?>
<?$page_th_js = Common::_t('page_th_js');
?>
<script>
$("#teacher_id").change(function(){//改变的时候才Post
	var old_class_status =$("#old_class_status").val();
	var substitute =1;
	if(old_class_status=='2'){
		substitute = $("#substitute").val();
	}else{
		substitute = $("input[name='substitute']:checked").val();
	}
	var old_teacher_id=$("#old_teacher_id").val();
	var teacher_id = $("#teacher_id").val();
	//代课方面
	if(substitute=='2'||substitute=='3'){
		if(old_teacher_id==teacher_id){//老师不变不对
			alert('<?=getStr($page_message, 'page_message_1')?>');
			return;
		}else{
			var old_teacher_info = '<?=getStr($page_th_js, 'page_th_js_1')?>:'+$("#old_teacher_name").val();
			var new_teacher_info = $("#teacher_id").find("option:selected").text();  ;
			$('#old_teacher_info').html(old_teacher_info);	
			$('#new_teacher_info').html(new_teacher_info);	
		}
	}
	else{//正常授课
		//old_teacher_id必须等于teacher_id
		if(old_teacher_id==teacher_id){//恢复上课老师
			var old_teacher_info = '<?=getStr($page_th_js, 'page_th_js_1')?>:'+$("#old_teacher_name").val();
			var new_teacher_info = '<?=getStr($page_th_js, 'page_th_js_2')?>';
			$('#old_teacher_info').html(old_teacher_info);	
			$('#new_teacher_info').html(new_teacher_info);	
		}else{
			alert('<?=getStr($page_message, 'page_message_2')?>');	
			return;
		}
	}
})		

$("input[type='radio']").change(function(){
	var old_class_status =$("#old_class_status").val();
	var substitute =1;
	if(old_class_status=='2'){
		substitute = $("#substitute").val();
	}else{
		substitute = $("input[name='substitute']:checked").val();
	}
	var old_teacher_id=$("#old_teacher_id").val();
	var teacher_id = $("#teacher_id").val();
	//代课方面
	if(substitute=='2'||substitute=='3'){
		if(old_teacher_id==teacher_id){//老师不变不对
			alert('<?=getStr($page_message, 'page_message_3')?>');
			return;
		}
	}else{//正常授课
		//old_teacher_id必须等于teacher_id
		if(old_teacher_id!=teacher_id){
			alert('<?=getStr($page_message, 'page_message_4')?>');
			return;
		}
	}

	var report_status = $("input[name='report_status']:checked").val();
	var teacher_status = $("input[name='teacher_status']:checked").val();
	if(report_status==3){//临时完全缺席,来不及换老师
		if(teacher_status==2){
			$("input[name='teacher_status'][value='1']").attr("checked",true); 
			alert('<?=getStr($page_message, 'page_message_5')?>');
			return;
		}
	}
})
		  
function subs(value){
	var old_class_status =$("#old_class_status").val();
	var substitute =1;
	if(old_class_status=='2'){
		substitute = $("#substitute").val();
	}else{
		substitute = $("input[name='substitute']:checked").val();
	}
	var old_teacher_id=$("#old_teacher_id").val();
	var teacher_id = $("#teacher_id").val();
	//代课方面
	if(substitute=='2'||substitute=='3'){
		if(old_teacher_id==teacher_id){//老师不变不对
			alert('<?=getStr($page_message, 'page_message_6')?>');
			return;
		}
	}else{//正常授课
		//old_teacher_id必须等于teacher_id
		if(old_teacher_id!=teacher_id){
			alert('<?=getStr($page_message, 'page_message_3')?>');
			return;
		}
	}

	var report_status = $("input[name='report_status']:checked").val();
	var teacher_status = $("input[name='teacher_status']:checked").val();
	if(report_status==3){//临时完全缺席,来不及换老师
		if(teacher_status==2){
			$("input[name='teacher_status'][value='1']").attr("checked",true); 
			alert('<?=getStr($page_message, 'page_message_7')?>');
			return;
		}
	}
	document.getElementById('form').action=value;
	document.getElementById('form').submit();
}
</script>       
    </body>
</html>